#include <stdio.h>

int main(void)
{
	//希望统计班级5个成绩的总成绩和平均分
	int scores[5]={0};
	//循环通过控制台窗口动态初始化数组
	for(int i=0;i<5;i++){
		printf("请输入第%d个学生的成绩:",i+1);
		scanf("%d",&scores[i]);
	}
	int count=0;
	int sum=0;
	//int sum1 = scores[0]+scores[1]+scores[2]+scores[3]+scores[4];
	while(count<5){
		sum+=scores[count];
		count++;
	}
	double avgScore = (double)sum/5;
	printf("sum:%d,avgScore:%.2f\n",sum,avgScore);
	return 0;
}
